package com.sh.data.engine.repository.dao.normalization.modeldesign.busmatrix.arg;

import com.sh.data.engine.repository.dao.normalization.modeldesign.dimfact.entity.DimFactEntity;
import com.sh.data.engine.repository.dao.normalization.research.themedesign.entity.ThemeEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author : changkong
 * @date : 2022/1/10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SaveMatrixArg {

    private ThemeEntity theme;

    private List<List<RelItem>> matrix;

    // id排序列表
    private List<String> dimIdSortedList;

    // id排序列表
    private List<String> factIdSortedList;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RelItem {

        private DimFactEntity factId;

        // 逻辑关联的字段
        private String factField;

        private DimFactEntity dimId;

        // 逻辑关联的字段
        private String dimField;

        /**
         * 逻辑关联
         */
        private Boolean logicRel;

        /**
         * 业务关联
         */
        private Boolean bizRel;
    }
}
